const { Schema, SchemaTypes } = require('../schema');
class Section extends Schema {
    PropertyModelDataTemplate () {
        return {
            areaId: {
                type: SchemaTypes.ObjectId,
                required: true
            },
            name: {
                type: SchemaTypes.String,
                required: true
            },
            description: {
                type: SchemaTypes.String,
                required: false
            },
            sort: {
                type: SchemaTypes.Number,
                required: false,
                default: 1
            },
            isEnable: {
                type: SchemaTypes.Boolean,
                required: true,
                default: false
            },
            productList: {
                type: SchemaTypes.Array,
                required: true
            },
            endTime: {
                type: SchemaTypes.Number,
                required: false
            },
            createTime: {
                type: SchemaTypes.Number,
                required: true,
                default: require('../../module/tool/time').getCurrentTimestamp()
            }
        };
    }
}

module.exports = Section;
